﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BG_News.aspx.cs" Inherits="BG_Manage_BG_News" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>新闻管理</title>
    <link href="BG_CSS/Main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <!-- 顶部栏-->
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="17" valign="top" background="BG_IMG/Main/mail_leftbg.gif">
                        <img src="BG_IMG/Main/left-top-right.gif" width="17" height="29" /></td>
                    <td valign="top" background="BG_IMG/Main/content-bg.gif">
                        <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
                            <tr>
                                <td height="31">
                                    <div class="titlebt">新闻管理</div>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="16" valign="top" background="BG_IMG/Main/mail_rightbg.gif">
                        <img src="BG_IMG/Main/nav-right-bg.gif" width="16" height="29" /></td>
                </tr>
                <!-- 中部栏-->
                <tr>
                    <td valign="middle" background="BG_IMG/Main/mail_leftbg.gif" style="height: 19px">
                    </td>
                    <td valign="top" bgcolor="#F7F8F9" style="height: 19px">
                        <div align="center">
                            <asp:Label ID="smslabel" runat="server" Height="8px" Width="100%"></asp:Label>
                        </div>
                        <!--*********************************************************************************************-->
                        <table class="border">
                            <td style="width: 900px">
                                <blockquote>
                                    <table align="center">
                                        <tr>
                                            <td style="width: 150px">
                                                请选择新闻分类:</td>
                                            <td colspan="2">
                                                <asp:DropDownList ID="listTypeName" runat="server" OnSelectedIndexChanged="listTypeName_SelectedIndexChanged" AutoPostBack="True">
                                                <asp:ListItem>显示所有新闻</asp:ListItem>
                                                </asp:DropDownList></td>
                                            <td style="width: 100px"></td>
                                            <td style="width: 80px">
                                                新闻搜索:</td>
                                            <td style="width: 200px">
                                                <asp:TextBox ID="txtSearch" runat="server" Width="200px"></asp:TextBox></td>
                                            <td style="width: 100px">
                                                <asp:DropDownList ID="listChoice" runat="server">
                                                    <asp:ListItem Value="标题">标题</asp:ListItem>
                                                    <asp:ListItem Value="内容">内容</asp:ListItem>
                                                </asp:DropDownList></td>
                                            <td>
                                                <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click"></asp:Button></td>
                                        </tr>
                                    </table>
                                    <div>
                                        <div>
                                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                                DataKeyNames="NewsID" ForeColor="#333333" GridLines="None" ShowFooter="True"
                                                Width="1000px" OnRowCommand="GridView1_RowCommand">
                                                <RowStyle ForeColor="#333333" BackColor="#F7F6F3" />
                                                <Columns>
                                                    <asp:TemplateField>
                                                        <FooterTemplate>
                                                            <asp:Button ID="btnDelche" runat="server" OnClick="btnDelche_Click1" Text="批量删除" />
                                                        </FooterTemplate>
                                                        <HeaderTemplate>
                                                            <asp:CheckBox ID="cheAll" runat="server" AutoPostBack="True" OnCheckedChanged="cheAll_CheckedChanged"
                                                                Text="全选" />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="cheOne" runat="server" AutoPostBack="True" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="NewsID" HeaderText="新闻ID" InsertVisible="False" ReadOnly="True"
                                                        SortExpression="NewsID" />
                                                    <asp:TemplateField HeaderText="新闻标题（点击修改）">
                                                        <ItemTemplate>
                                                            <a href='BG_NewsEdit.aspx?NewsID=<%# DataBinder.Eval(Container.DataItem, "NewsID")%>'>
                                                                <%# DataBinder.Eval(Container.DataItem, "Title")%>
                                                            </a>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="UserID" HeaderText="发布者ID" SortExpression="UserID" />
                                                    <asp:BoundField DataField="Author" HeaderText="作者" SortExpression="Author" />
                                                    <asp:BoundField DataField="TypeName" HeaderText="新闻分类" SortExpression="TypeName" />
                                                    <asp:BoundField DataField="TypeNo" HeaderText="分类No" SortExpression="TypeNo" />
                                                    <asp:BoundField DataField="PubDate" HeaderText="发布/修改时间" SortExpression="PubDate" />
                                                    <asp:BoundField DataField="Score" HeaderText="得分" SortExpression="Score" />
                                                    <asp:BoundField DataField="Clicked" HeaderText="点击次数" SortExpression="Clicked" />
                                                    <asp:TemplateField HeaderText="评论">
                                                        <ItemTemplate>
                                                            <a href='BG_Comments.aspx?NewsID=<%# DataBinder.Eval(Container.DataItem, "NewsID")%>&TypeName=<%# DataBinder.Eval(Container.DataItem, "TypeName")%>'
                                                                target="_self">评论</a>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="操 作">
                                                        <ItemTemplate>
                                                            <asp:Button ID="btnDel" runat="server" Text="删 除" CausesValidation="False" CommandName="DeleteNews"
                                                                OnClientClick='return confirm("您真的要删除这条记录吗？")' CommandArgument='<%#Eval("NewsID") %>' />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                        <div>
                                            <table align="center">
                                                <tr>
                                                    <td colspan="3" rowspan="3" style="font-size: small; width: 500px; height: 1px; text-align: left">
                                                        共<asp:Label ID="Label10" runat="server" Font-Size="Small" Text="Label"><%=GridView1.PageCount%></asp:Label>页
                                                        当前第<asp:Label ID="Label11" runat="server" Font-Size="Small" Text="Label"><%=GridView1.PageIndex+1%></asp:Label>
                                                        页&nbsp;
                                                    </td>
                                                    <td align="right" colspan="1" rowspan="3" style="font-size: small; width: 400px;
                                                        height: 1px; text-align: right">
                                                        <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="first" CommandName="A"
                                                            Font-Underline="False" ForeColor="Black" OnClick="LinkButton1_Click">首页</asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="prev" CommandName="A"
                                                            Font-Underline="False" ForeColor="Black" OnClick="LinkButton1_Click">上一页</asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="next" CommandName="A"
                                                            Font-Underline="False" ForeColor="Black" OnClick="LinkButton1_Click">下一页</asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="last" CommandName="A"
                                                            Font-Underline="False" ForeColor="Black" OnClick="LinkButton1_Click">尾页</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </blockquote>
                            </td>
                        </table>
                        <!--*********************************************************************************************-->
                    </td>
                    <td background="BG_IMG/Main/mail_rightbg.gif" style="height: 19px" />
                </tr>
                <!-- 底部栏-->
                <tr>
                    <td valign="bottom" background="BG_IMG/Main/mail_leftbg.gif" style="height: 17px">
                        <img src="BG_IMG/Main/buttom_left2.gif" width="17" height="17" /></td>
                    <td background="BG_IMG/Main/buttom_bgs.gif" style="height: 17px">
                        <img src="BG_IMG/Main/buttom_bgs.gif" width="17" height="17"></td>
                    <td valign="bottom" background="BG_IMG/Main/mail_rightbg.gif" style="height: 17px">
                        <img src="BG_IMG/Main/buttom_right2.gif" width="16" height="17" /></td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
